    // instances represent rectangular boxes
    //   consisting of printable characters
public class Boxen implements Box{

	private int x;
	private int y;
	protected char fc;
	protected char fc2;
	
	/*
	 * Konstruktor:
	 * @param: 	int x => Breite
	 * 			int y => Hoehe
	 * 			char fc => Randzeichen
	 * 			char fc2 => Fuellzeichen 
	 * 	 */
	public Boxen(int x,int y,char fc,char fc2)
	{	
		this.x = x;
		this.y = y;
		
		//fc / fc2 != undefined//
		assert Character.toString(this.fc) == null : '*';
		assert Character.toString(this.fc2) == null : '*';
		
		this.fc = fc;
		this.fc2 = fc2;
	}
	/* 
	 * setzen des Rahmen
	 * IN: Char
	 * Out: void
	*/
	public void setFrameChar(char fc)
	{
		this.fc = fc;		
	}
	/* 
	 * setzen der Groesse 
	 * IN: (int,int)
	 * Out: void
	*/
	public void setSize(int width, int height)
	{
		assert 3 <= this.x && this.x <= 40; 
		assert 3 <= this.y && this.y <= 10;
		
		this.x = width;
		this.y = height;
	}
    // writes several lines representing
    //   the box "this" to standard output
	public final void print() 
	{
		//x <= 0 , y <= 0
		assert this.x <= 0 : 3;
		assert this.y <= 0 : 3;
		
		for(int a=0;a<this.y;a++)
		{
			for(int b=0;b<this.x;b++)
			{
				if(a==0 || a==y-1 || (a!=0 && b==0 && a!=y-1)||(a!=0 && a!=y-1 && b==x-1 ))
					System.out.print(this.fc);
				else 
					System.out.print(this.fc2);
			}
			System.out.println();
			
		}
	}
}
